#{include '/Application/header.html'/}
<body>
    <div class="head" style="width:85%; margin:0 auto;">
        <div class="logo fl">芭伦斯商贸鞋业    基础版    <a>升级</a>          到期时间：2017-8-20 您还有50天到期</div>
        <div class="service fr">
            <span>
                旺旺客服：<img src="/public/images/kf1.jpg"/><br/>
                Q Q客服：<img src="/public/images/kf2.jpg"/>
            </span>
            <span class="h30"><img src="/public/images/t1.jpg"/>刷新 <img src="/public/images/t2.jpg"/>退出</span>
        </div>
    </div>
    <div class="nav">
        #{include '/Application/page_title.html'/}
    </div>
    <div class="row row-width" style="margin:20px auto; min-height:710px;">
    	<div class="bt_list">
        	<span>黑名单列表</span>
            <form method="get" action="/application/heimingdan_save" onsubmit="return checkElement()">
                <p class="xinz">
                    <input style="width:167px;" placeholder="请输入新增姓名"  name="username" id="username"/>
                    <button type="submit" class="btn btn-primary" style="height:30px; margin-left:-54px; margin-top:-2px;">新增</button>
                </p>
            </form>
            <script>
                function  checkElement() {
                    if($("#username").val()==""){
                        layer.msg("用户名不能为空");
                        return false;
                    }
                    return true;
                }
                function deleteElement() {
                    return confirm("确定要删除吗？");
                }
            </script>
        </div>
        <div class="table-responsive table-width" style="width:40%;" >
                <table class="table table-striped mt0" >
                  <thead>
                    <tr class="f14 tr-background" style="background:#5e5d5d;">
                      <th><input type="checkbox"></th>
                      <th>姓名</th>
                      <th>删除</th>
                    </tr>
                  </thead>
                  <tbody>

                  #{list pageBean?.page}
                      <tr class="f14">
                          <th><input type="checkbox"></th>
                          <th>${_?.username}</th>
                          <th><a href="/?id=${_?.id}" onclick="return deleteElement();">删除</a></th>
                      </tr>
                  #{/list}

                  </tbody> 
                </table>
              </div>
        <div>
        #{page currPage:pageBean.currPage,totalCount:pageBean.totalCount,pageSize:pageBean.pageSize  /}

        </div>


    </div>
    #{include '/Application/footer.html'/}
</body>

<script type="text/javascript">
    #{if code?.equals("1")}
        layer.alert("${msg}",function () {
            window.location='/Application/heimingdan';
        });
    #{/if}
$(document).ready(function(e) {
	$('#che,#che1,#che2').lc_switch();
	// triggered each time a field changes status
	$('body').delegate('.lcs_check', 'lcs-statuschange', function() {
		var status = ($(this).is(':checked')) ? 'checked' : 'unchecked';
		console.log('field changed status: '+ status );
	});

	// triggered each time a field is checked
	$('body').delegate('.lcs_check', 'lcs-on', function() {
		console.log('field is checked');
	});
	
	
	// triggered each time a is unchecked
	$('body').delegate('.lcs_check', 'lcs-off', function() {
		console.log('field is unchecked');
	});
});
</script>
</html>
